﻿using System.ComponentModel.DataAnnotations;

namespace GioHangViet.Models
{
    [Table("Authors")]
    public class Author
    {
        [Required(ErrorMessageResourceType = typeof(Resources.Error),ErrorMessageResourceName = "ErrorAuthorName")]
        [StringLength(50, ErrorMessageResourceType = typeof(Resources.Error), ErrorMessageResourceName = "ErrorAuthorNameLength")]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayAuthorAuthorName")]
        public string Authorname { get; set; }

        [Key]
        [Required(ErrorMessageResourceType = typeof(Resources.Error), ErrorMessageResourceName = "ErrorAuthorAlias")]
        [StringLength(50, ErrorMessageResourceType = typeof(Resources.Error), ErrorMessageResourceName = "ErrorAuthorAliasLength")]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayAuthorAlias")]
        public string Alias { get; set; }
    }
}